<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
<title>TsExtractor (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="TsExtractor (ExoPlayer library)";
        }
    }
    catch(err) {
    }
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">com.google.android.exoplayer2.extractor.ts</a></div>
<h2 title="Class TsExtractor" class="title">Class TsExtractor</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>com.google.android.exoplayer2.extractor.ts.TsExtractor</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="../Extractor.html" title="interface in com.google.android.exoplayer2.extractor">Extractor</a></code></dd>
</dl>
<hr>
<pre>public final class <span class="typeNameLabel">TsExtractor</span>
extends <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>
implements <a href="../Extractor.html" title="interface in com.google.android.exoplayer2.extractor">Extractor</a></pre>
<div class="block">Extracts data from the MPEG-2 TS container format.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="TsExtractor.Mode.html" title="annotation in com.google.android.exoplayer2.extractor.ts">TsExtractor.Mode</a></span></code></th>
<td class="colLast">
<div class="block">Modes for the extractor.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.com.google.android.exoplayer2.extractor.Extractor">
<!--   -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;com.google.android.exoplayer2.extractor.<a href="../Extractor.html" title="interface in com.google.android.exoplayer2.extractor">Extractor</a></h3>
<code><a href="../Extractor.ReadResult.html" title="annotation in com.google.android.exoplayer2.extractor">Extractor.ReadResult</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_TIMESTAMP_SEARCH_BYTES">DEFAULT_TIMESTAMP_SEARCH_BYTES</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../ExtractorsFactory.html" title="interface in com.google.android.exoplayer2.extractor">ExtractorsFactory</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FACTORY">FACTORY</a></span></code></th>
<td class="colLast">
<div class="block">Factory for <a href="TsExtractor.html" title="class in com.google.android.exoplayer2.extractor.ts"><code>TsExtractor</code></a> instances.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#MODE_HLS">MODE_HLS</a></span></code></th>
<td class="colLast">
<div class="block">Enable single PMT mode, map <a href="../TrackOutput.html" title="interface in com.google.android.exoplayer2.extractor"><code>TrackOutput</code></a>s by their type (instead of PID) and ignore
 continuity counters.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#MODE_MULTI_PMT">MODE_MULTI_PMT</a></span></code></th>
<td class="colLast">
<div class="block">Behave as defined in ISO/IEC 13818-1.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#MODE_SINGLE_PMT">MODE_SINGLE_PMT</a></span></code></th>
<td class="colLast">
<div class="block">Assume only one PMT will be contained in the stream, even if more are declared by the PAT.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TS_PACKET_SIZE">TS_PACKET_SIZE</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TS_STREAM_TYPE_AAC_ADTS">TS_STREAM_TYPE_AAC_ADTS</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TS_STREAM_TYPE_AAC_LATM">TS_STREAM_TYPE_AAC_LATM</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TS_STREAM_TYPE_AC3">TS_STREAM_TYPE_AC3</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TS_STREAM_TYPE_AC4">TS_STREAM_TYPE_AC4</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TS_STREAM_TYPE_AIT">TS_STREAM_TYPE_AIT</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TS_STREAM_TYPE_DTS">TS_STREAM_TYPE_DTS</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TS_STREAM_TYPE_DVBSUBS">TS_STREAM_TYPE_DVBSUBS</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TS_STREAM_TYPE_E_AC3">TS_STREAM_TYPE_E_AC3</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TS_STREAM_TYPE_H262">TS_STREAM_TYPE_H262</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TS_STREAM_TYPE_H263">TS_STREAM_TYPE_H263</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TS_STREAM_TYPE_H264">TS_STREAM_TYPE_H264</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TS_STREAM_TYPE_H265">TS_STREAM_TYPE_H265</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TS_STREAM_TYPE_HDMV_DTS">TS_STREAM_TYPE_HDMV_DTS</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TS_STREAM_TYPE_ID3">TS_STREAM_TYPE_ID3</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TS_STREAM_TYPE_MPA">TS_STREAM_TYPE_MPA</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TS_STREAM_TYPE_MPA_LSF">TS_STREAM_TYPE_MPA_LSF</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TS_STREAM_TYPE_SPLICE_INFO">TS_STREAM_TYPE_SPLICE_INFO</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TS_SYNC_BYTE">TS_SYNC_BYTE</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.com.google.android.exoplayer2.extractor.Extractor">
<!--   -->
</a>
<h3>Fields inherited from interface&nbsp;com.google.android.exoplayer2.extractor.<a href="../Extractor.html" title="interface in com.google.android.exoplayer2.extractor">Extractor</a></h3>
<code><a href="../Extractor.html#RESULT_CONTINUE">RESULT_CONTINUE</a>, <a href="../Extractor.html#RESULT_END_OF_INPUT">RESULT_END_OF_INPUT</a>, <a href="../Extractor.html#RESULT_SEEK">RESULT_SEEK</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">TsExtractor</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(int)">TsExtractor</a></span>&#8203;(int&nbsp;defaultTsPayloadReaderFlags)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(int,int,int)">TsExtractor</a></span>&#8203;(int&nbsp;mode,
           int&nbsp;defaultTsPayloadReaderFlags,
           int&nbsp;timestampSearchBytes)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(int,com.google.android.exoplayer2.util.TimestampAdjuster,com.google.android.exoplayer2.extractor.ts.TsPayloadReader.Factory)">TsExtractor</a></span>&#8203;(int&nbsp;mode,
           <a href="../../util/TimestampAdjuster.html" title="class in com.google.android.exoplayer2.util">TimestampAdjuster</a>&nbsp;timestampAdjuster,
           <a href="TsPayloadReader.Factory.html" title="interface in com.google.android.exoplayer2.extractor.ts">TsPayloadReader.Factory</a>&nbsp;payloadReaderFactory)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(int,com.google.android.exoplayer2.util.TimestampAdjuster,com.google.android.exoplayer2.extractor.ts.TsPayloadReader.Factory,int)">TsExtractor</a></span>&#8203;(int&nbsp;mode,
           <a href="../../util/TimestampAdjuster.html" title="class in com.google.android.exoplayer2.util">TimestampAdjuster</a>&nbsp;timestampAdjuster,
           <a href="TsPayloadReader.Factory.html" title="interface in com.google.android.exoplayer2.extractor.ts">TsPayloadReader.Factory</a>&nbsp;payloadReaderFactory,
           int&nbsp;timestampSearchBytes)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#init(com.google.android.exoplayer2.extractor.ExtractorOutput)">init</a></span>&#8203;(<a href="../ExtractorOutput.html" title="interface in com.google.android.exoplayer2.extractor">ExtractorOutput</a>&nbsp;output)</code></th>
<td class="colLast">
<div class="block">Initializes the extractor with an <a href="../ExtractorOutput.html" title="interface in com.google.android.exoplayer2.extractor"><code>ExtractorOutput</code></a>.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#read(com.google.android.exoplayer2.extractor.ExtractorInput,com.google.android.exoplayer2.extractor.PositionHolder)">read</a></span>&#8203;(<a href="../ExtractorInput.html" title="interface in com.google.android.exoplayer2.extractor">ExtractorInput</a>&nbsp;input,
    <a href="../PositionHolder.html" title="class in com.google.android.exoplayer2.extractor">PositionHolder</a>&nbsp;seekPosition)</code></th>
<td class="colLast">
<div class="block">Extracts data read from a provided <a href="../ExtractorInput.html" title="interface in com.google.android.exoplayer2.extractor"><code>ExtractorInput</code></a>.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#release()">release</a></span>()</code></th>
<td class="colLast">
<div class="block">Releases all kept resources.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#seek(long,long)">seek</a></span>&#8203;(long&nbsp;position,
    long&nbsp;timeUs)</code></th>
<td class="colLast">
<div class="block">Notifies the extractor that a seek has occurred.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sniff(com.google.android.exoplayer2.extractor.ExtractorInput)">sniff</a></span>&#8203;(<a href="../ExtractorInput.html" title="interface in com.google.android.exoplayer2.extractor">ExtractorInput</a>&nbsp;input)</code></th>
<td class="colLast">
<div class="block">Returns whether this extractor can extract samples from the <a href="../ExtractorInput.html" title="interface in com.google.android.exoplayer2.extractor"><code>ExtractorInput</code></a>, which must
 provide data from the start of the stream.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></h3>
<code><a href="https://developer.android.com/reference/java/lang/Object.html#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink" target="_top">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a id="FACTORY">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FACTORY</h4>
<pre>public static final&nbsp;<a href="../ExtractorsFactory.html" title="interface in com.google.android.exoplayer2.extractor">ExtractorsFactory</a> FACTORY</pre>
<div class="block">Factory for <a href="TsExtractor.html" title="class in com.google.android.exoplayer2.extractor.ts"><code>TsExtractor</code></a> instances.</div>
</li>
</ul>
<a id="MODE_MULTI_PMT">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MODE_MULTI_PMT</h4>
<pre>public static final&nbsp;int MODE_MULTI_PMT</pre>
<div class="block">Behave as defined in ISO/IEC 13818-1.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.extractor.ts.TsExtractor.MODE_MULTI_PMT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="MODE_SINGLE_PMT">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MODE_SINGLE_PMT</h4>
<pre>public static final&nbsp;int MODE_SINGLE_PMT</pre>
<div class="block">Assume only one PMT will be contained in the stream, even if more are declared by the PAT.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.extractor.ts.TsExtractor.MODE_SINGLE_PMT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="MODE_HLS">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MODE_HLS</h4>
<pre>public static final&nbsp;int MODE_HLS</pre>
<div class="block">Enable single PMT mode, map <a href="../TrackOutput.html" title="interface in com.google.android.exoplayer2.extractor"><code>TrackOutput</code></a>s by their type (instead of PID) and ignore
 continuity counters.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.extractor.ts.TsExtractor.MODE_HLS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TS_PACKET_SIZE">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TS_PACKET_SIZE</h4>
<pre>public static final&nbsp;int TS_PACKET_SIZE</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.extractor.ts.TsExtractor.TS_PACKET_SIZE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="DEFAULT_TIMESTAMP_SEARCH_BYTES">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_TIMESTAMP_SEARCH_BYTES</h4>
<pre>public static final&nbsp;int DEFAULT_TIMESTAMP_SEARCH_BYTES</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.extractor.ts.TsExtractor.DEFAULT_TIMESTAMP_SEARCH_BYTES">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TS_STREAM_TYPE_MPA">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TS_STREAM_TYPE_MPA</h4>
<pre>public static final&nbsp;int TS_STREAM_TYPE_MPA</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.extractor.ts.TsExtractor.TS_STREAM_TYPE_MPA">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TS_STREAM_TYPE_MPA_LSF">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TS_STREAM_TYPE_MPA_LSF</h4>
<pre>public static final&nbsp;int TS_STREAM_TYPE_MPA_LSF</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.extractor.ts.TsExtractor.TS_STREAM_TYPE_MPA_LSF">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TS_STREAM_TYPE_AAC_ADTS">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TS_STREAM_TYPE_AAC_ADTS</h4>
<pre>public static final&nbsp;int TS_STREAM_TYPE_AAC_ADTS</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.extractor.ts.TsExtractor.TS_STREAM_TYPE_AAC_ADTS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TS_STREAM_TYPE_AAC_LATM">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TS_STREAM_TYPE_AAC_LATM</h4>
<pre>public static final&nbsp;int TS_STREAM_TYPE_AAC_LATM</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.extractor.ts.TsExtractor.TS_STREAM_TYPE_AAC_LATM">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TS_STREAM_TYPE_AC3">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TS_STREAM_TYPE_AC3</h4>
<pre>public static final&nbsp;int TS_STREAM_TYPE_AC3</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.extractor.ts.TsExtractor.TS_STREAM_TYPE_AC3">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TS_STREAM_TYPE_DTS">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TS_STREAM_TYPE_DTS</h4>
<pre>public static final&nbsp;int TS_STREAM_TYPE_DTS</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.extractor.ts.TsExtractor.TS_STREAM_TYPE_DTS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TS_STREAM_TYPE_HDMV_DTS">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TS_STREAM_TYPE_HDMV_DTS</h4>
<pre>public static final&nbsp;int TS_STREAM_TYPE_HDMV_DTS</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.extractor.ts.TsExtractor.TS_STREAM_TYPE_HDMV_DTS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TS_STREAM_TYPE_E_AC3">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TS_STREAM_TYPE_E_AC3</h4>
<pre>public static final&nbsp;int TS_STREAM_TYPE_E_AC3</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.extractor.ts.TsExtractor.TS_STREAM_TYPE_E_AC3">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TS_STREAM_TYPE_AC4">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TS_STREAM_TYPE_AC4</h4>
<pre>public static final&nbsp;int TS_STREAM_TYPE_AC4</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.extractor.ts.TsExtractor.TS_STREAM_TYPE_AC4">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TS_STREAM_TYPE_H262">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TS_STREAM_TYPE_H262</h4>
<pre>public static final&nbsp;int TS_STREAM_TYPE_H262</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.extractor.ts.TsExtractor.TS_STREAM_TYPE_H262">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TS_STREAM_TYPE_H263">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TS_STREAM_TYPE_H263</h4>
<pre>public static final&nbsp;int TS_STREAM_TYPE_H263</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.extractor.ts.TsExtractor.TS_STREAM_TYPE_H263">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TS_STREAM_TYPE_H264">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TS_STREAM_TYPE_H264</h4>
<pre>public static final&nbsp;int TS_STREAM_TYPE_H264</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.extractor.ts.TsExtractor.TS_STREAM_TYPE_H264">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TS_STREAM_TYPE_H265">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TS_STREAM_TYPE_H265</h4>
<pre>public static final&nbsp;int TS_STREAM_TYPE_H265</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.extractor.ts.TsExtractor.TS_STREAM_TYPE_H265">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TS_STREAM_TYPE_ID3">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TS_STREAM_TYPE_ID3</h4>
<pre>public static final&nbsp;int TS_STREAM_TYPE_ID3</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.extractor.ts.TsExtractor.TS_STREAM_TYPE_ID3">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TS_STREAM_TYPE_SPLICE_INFO">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TS_STREAM_TYPE_SPLICE_INFO</h4>
<pre>public static final&nbsp;int TS_STREAM_TYPE_SPLICE_INFO</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.extractor.ts.TsExtractor.TS_STREAM_TYPE_SPLICE_INFO">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TS_STREAM_TYPE_DVBSUBS">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TS_STREAM_TYPE_DVBSUBS</h4>
<pre>public static final&nbsp;int TS_STREAM_TYPE_DVBSUBS</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.extractor.ts.TsExtractor.TS_STREAM_TYPE_DVBSUBS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TS_STREAM_TYPE_AIT">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TS_STREAM_TYPE_AIT</h4>
<pre>public static final&nbsp;int TS_STREAM_TYPE_AIT</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.extractor.ts.TsExtractor.TS_STREAM_TYPE_AIT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TS_SYNC_BYTE">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>TS_SYNC_BYTE</h4>
<pre>public static final&nbsp;int TS_SYNC_BYTE</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.extractor.ts.TsExtractor.TS_SYNC_BYTE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TsExtractor</h4>
<pre>public&nbsp;TsExtractor()</pre>
</li>
</ul>
<a id="&lt;init&gt;(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TsExtractor</h4>
<pre>public&nbsp;TsExtractor&#8203;(<a href="DefaultTsPayloadReaderFactory.Flags.html" title="annotation in com.google.android.exoplayer2.extractor.ts">@Flags</a>
                   int&nbsp;defaultTsPayloadReaderFlags)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>defaultTsPayloadReaderFlags</code> - A combination of <a href="DefaultTsPayloadReaderFactory.html" title="class in com.google.android.exoplayer2.extractor.ts"><code>DefaultTsPayloadReaderFactory</code></a>
     <code>FLAG_*</code> values that control the behavior of the payload readers.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(int,int,int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TsExtractor</h4>
<pre>public&nbsp;TsExtractor&#8203;(<a href="TsExtractor.Mode.html" title="annotation in com.google.android.exoplayer2.extractor.ts">@Mode</a>
                   int&nbsp;mode,
                   <a href="DefaultTsPayloadReaderFactory.Flags.html" title="annotation in com.google.android.exoplayer2.extractor.ts">@Flags</a>
                   int&nbsp;defaultTsPayloadReaderFlags,
                   int&nbsp;timestampSearchBytes)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mode</code> - Mode for the extractor. One of <a href="#MODE_MULTI_PMT"><code>MODE_MULTI_PMT</code></a>, <a href="#MODE_SINGLE_PMT"><code>MODE_SINGLE_PMT</code></a>
     and <a href="#MODE_HLS"><code>MODE_HLS</code></a>.</dd>
<dd><code>defaultTsPayloadReaderFlags</code> - A combination of <a href="DefaultTsPayloadReaderFactory.html" title="class in com.google.android.exoplayer2.extractor.ts"><code>DefaultTsPayloadReaderFactory</code></a>
     <code>FLAG_*</code> values that control the behavior of the payload readers.</dd>
<dd><code>timestampSearchBytes</code> - The number of bytes searched from a given position in the stream to
     find a PCR timestamp. If this value is too small, the duration might be unknown and seeking
     might not be supported for high bitrate progressive streams. Setting a large value for this
     field might be inefficient though because the extractor stores a buffer of <code>
     timestampSearchBytes</code> bytes when determining the duration or when performing a seek
     operation. The default value is <a href="#DEFAULT_TIMESTAMP_SEARCH_BYTES"><code>DEFAULT_TIMESTAMP_SEARCH_BYTES</code></a>. If the number of
     bytes left in the stream from the current position is less than <code>
     timestampSearchBytes</code>, the search is performed on the bytes left.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(int,com.google.android.exoplayer2.util.TimestampAdjuster,com.google.android.exoplayer2.extractor.ts.TsPayloadReader.Factory)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TsExtractor</h4>
<pre>public&nbsp;TsExtractor&#8203;(<a href="TsExtractor.Mode.html" title="annotation in com.google.android.exoplayer2.extractor.ts">@Mode</a>
                   int&nbsp;mode,
                   <a href="../../util/TimestampAdjuster.html" title="class in com.google.android.exoplayer2.util">TimestampAdjuster</a>&nbsp;timestampAdjuster,
                   <a href="TsPayloadReader.Factory.html" title="interface in com.google.android.exoplayer2.extractor.ts">TsPayloadReader.Factory</a>&nbsp;payloadReaderFactory)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mode</code> - Mode for the extractor. One of <a href="#MODE_MULTI_PMT"><code>MODE_MULTI_PMT</code></a>, <a href="#MODE_SINGLE_PMT"><code>MODE_SINGLE_PMT</code></a>
     and <a href="#MODE_HLS"><code>MODE_HLS</code></a>.</dd>
<dd><code>timestampAdjuster</code> - A timestamp adjuster for offsetting and scaling sample timestamps.</dd>
<dd><code>payloadReaderFactory</code> - Factory for injecting a custom set of payload readers.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(int,com.google.android.exoplayer2.util.TimestampAdjuster,com.google.android.exoplayer2.extractor.ts.TsPayloadReader.Factory,int)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>TsExtractor</h4>
<pre>public&nbsp;TsExtractor&#8203;(<a href="TsExtractor.Mode.html" title="annotation in com.google.android.exoplayer2.extractor.ts">@Mode</a>
                   int&nbsp;mode,
                   <a href="../../util/TimestampAdjuster.html" title="class in com.google.android.exoplayer2.util">TimestampAdjuster</a>&nbsp;timestampAdjuster,
                   <a href="TsPayloadReader.Factory.html" title="interface in com.google.android.exoplayer2.extractor.ts">TsPayloadReader.Factory</a>&nbsp;payloadReaderFactory,
                   int&nbsp;timestampSearchBytes)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mode</code> - Mode for the extractor. One of <a href="#MODE_MULTI_PMT"><code>MODE_MULTI_PMT</code></a>, <a href="#MODE_SINGLE_PMT"><code>MODE_SINGLE_PMT</code></a>
     and <a href="#MODE_HLS"><code>MODE_HLS</code></a>.</dd>
<dd><code>timestampAdjuster</code> - A timestamp adjuster for offsetting and scaling sample timestamps.</dd>
<dd><code>payloadReaderFactory</code> - Factory for injecting a custom set of payload readers.</dd>
<dd><code>timestampSearchBytes</code> - The number of bytes searched from a given position in the stream to
     find a PCR timestamp. If this value is too small, the duration might be unknown and seeking
     might not be supported for high bitrate progressive streams. Setting a large value for this
     field might be inefficient though because the extractor stores a buffer of <code>
     timestampSearchBytes</code> bytes when determining the duration or when performing a seek
     operation. The default value is <a href="#DEFAULT_TIMESTAMP_SEARCH_BYTES"><code>DEFAULT_TIMESTAMP_SEARCH_BYTES</code></a>. If the number of
     bytes left in the stream from the current position is less than <code>
     timestampSearchBytes</code>, the search is performed on the bytes left.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a id="sniff(com.google.android.exoplayer2.extractor.ExtractorInput)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sniff</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;sniff&#8203;(<a href="../ExtractorInput.html" title="interface in com.google.android.exoplayer2.extractor">ExtractorInput</a>&nbsp;input)
              throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../Extractor.html#sniff(com.google.android.exoplayer2.extractor.ExtractorInput)">Extractor</a></code></span></div>
<div class="block">Returns whether this extractor can extract samples from the <a href="../ExtractorInput.html" title="interface in com.google.android.exoplayer2.extractor"><code>ExtractorInput</code></a>, which must
 provide data from the start of the stream.

 <p>If <code>true</code> is returned, the <code>input</code>'s reading position may have been modified.
 Otherwise, only its peek position may have been modified.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../Extractor.html#sniff(com.google.android.exoplayer2.extractor.ExtractorInput)">sniff</a></code>&nbsp;in interface&nbsp;<code><a href="../Extractor.html" title="interface in com.google.android.exoplayer2.extractor">Extractor</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - The <a href="../ExtractorInput.html" title="interface in com.google.android.exoplayer2.extractor"><code>ExtractorInput</code></a> from which data should be peeked/read.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Whether this extractor can read the provided input.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></code> - If an error occurred reading from the input.</dd>
</dl>
</li>
</ul>
<a id="init(com.google.android.exoplayer2.extractor.ExtractorOutput)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>init</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;init&#8203;(<a href="../ExtractorOutput.html" title="interface in com.google.android.exoplayer2.extractor">ExtractorOutput</a>&nbsp;output)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../Extractor.html#init(com.google.android.exoplayer2.extractor.ExtractorOutput)">Extractor</a></code></span></div>
<div class="block">Initializes the extractor with an <a href="../ExtractorOutput.html" title="interface in com.google.android.exoplayer2.extractor"><code>ExtractorOutput</code></a>. Called at most once.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../Extractor.html#init(com.google.android.exoplayer2.extractor.ExtractorOutput)">init</a></code>&nbsp;in interface&nbsp;<code><a href="../Extractor.html" title="interface in com.google.android.exoplayer2.extractor">Extractor</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>output</code> - An <a href="../ExtractorOutput.html" title="interface in com.google.android.exoplayer2.extractor"><code>ExtractorOutput</code></a> to receive extracted data.</dd>
</dl>
</li>
</ul>
<a id="seek(long,long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>seek</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;seek&#8203;(long&nbsp;position,
                 long&nbsp;timeUs)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../Extractor.html#seek(long,long)">Extractor</a></code></span></div>
<div class="block">Notifies the extractor that a seek has occurred.
 <p>
 Following a call to this method, the <a href="../ExtractorInput.html" title="interface in com.google.android.exoplayer2.extractor"><code>ExtractorInput</code></a> passed to the next invocation of
 <a href="../Extractor.html#read(com.google.android.exoplayer2.extractor.ExtractorInput,com.google.android.exoplayer2.extractor.PositionHolder)"><code>Extractor.read(ExtractorInput, PositionHolder)</code></a> is required to provide data starting from <code>
 position</code> in the stream. Valid random access positions are the start of the stream and
 positions that can be obtained from any <a href="../SeekMap.html" title="interface in com.google.android.exoplayer2.extractor"><code>SeekMap</code></a> passed to the <a href="../ExtractorOutput.html" title="interface in com.google.android.exoplayer2.extractor"><code>ExtractorOutput</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../Extractor.html#seek(long,long)">seek</a></code>&nbsp;in interface&nbsp;<code><a href="../Extractor.html" title="interface in com.google.android.exoplayer2.extractor">Extractor</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>position</code> - The byte offset in the stream from which data will be provided.</dd>
<dd><code>timeUs</code> - The seek time in microseconds.</dd>
</dl>
</li>
</ul>
<a id="release()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>release</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;release()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../Extractor.html#release()">Extractor</a></code></span></div>
<div class="block">Releases all kept resources.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../Extractor.html#release()">release</a></code>&nbsp;in interface&nbsp;<code><a href="../Extractor.html" title="interface in com.google.android.exoplayer2.extractor">Extractor</a></code></dd>
</dl>
</li>
</ul>
<a id="read(com.google.android.exoplayer2.extractor.ExtractorInput,com.google.android.exoplayer2.extractor.PositionHolder)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>read</h4>
<pre class="methodSignature"><a href="../Extractor.ReadResult.html" title="annotation in com.google.android.exoplayer2.extractor">@ReadResult</a>
public&nbsp;int&nbsp;read&#8203;(<a href="../ExtractorInput.html" title="interface in com.google.android.exoplayer2.extractor">ExtractorInput</a>&nbsp;input,
                <a href="../PositionHolder.html" title="class in com.google.android.exoplayer2.extractor">PositionHolder</a>&nbsp;seekPosition)
         throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../Extractor.html#read(com.google.android.exoplayer2.extractor.ExtractorInput,com.google.android.exoplayer2.extractor.PositionHolder)">Extractor</a></code></span></div>
<div class="block">Extracts data read from a provided <a href="../ExtractorInput.html" title="interface in com.google.android.exoplayer2.extractor"><code>ExtractorInput</code></a>. Must not be called before <a href="../Extractor.html#init(com.google.android.exoplayer2.extractor.ExtractorOutput)"><code>Extractor.init(ExtractorOutput)</code></a>.

 <p>A single call to this method will block until some progress has been made, but will not
 block for longer than this. Hence each call will consume only a small amount of input data.

 <p>In the common case, <a href="../Extractor.html#RESULT_CONTINUE"><code>Extractor.RESULT_CONTINUE</code></a> is returned to indicate that the <a href="../ExtractorInput.html" title="interface in com.google.android.exoplayer2.extractor"><code>ExtractorInput</code></a> passed to the next read is required to provide data continuing from the
 position in the stream reached by the returning call. If the extractor requires data to be
 provided from a different position, then that position is set in <code>seekPosition</code> and
 <a href="../Extractor.html#RESULT_SEEK"><code>Extractor.RESULT_SEEK</code></a> is returned. If the extractor reached the end of the data provided by the
 <a href="../ExtractorInput.html" title="interface in com.google.android.exoplayer2.extractor"><code>ExtractorInput</code></a>, then <a href="../Extractor.html#RESULT_END_OF_INPUT"><code>Extractor.RESULT_END_OF_INPUT</code></a> is returned.

 <p>When this method throws an <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top"><code>IOException</code></a>, extraction may continue by providing an
 <a href="../ExtractorInput.html" title="interface in com.google.android.exoplayer2.extractor"><code>ExtractorInput</code></a> with an unchanged <a href="../ExtractorInput.html#getPosition()"><code>read position</code></a> to
 a subsequent call to this method.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../Extractor.html#read(com.google.android.exoplayer2.extractor.ExtractorInput,com.google.android.exoplayer2.extractor.PositionHolder)">read</a></code>&nbsp;in interface&nbsp;<code><a href="../Extractor.html" title="interface in com.google.android.exoplayer2.extractor">Extractor</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - The <a href="../ExtractorInput.html" title="interface in com.google.android.exoplayer2.extractor"><code>ExtractorInput</code></a> from which data should be read.</dd>
<dd><code>seekPosition</code> - If <a href="../Extractor.html#RESULT_SEEK"><code>Extractor.RESULT_SEEK</code></a> is returned, this holder is updated to hold the
     position of the required data.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>One of the <code>RESULT_</code> values defined in this interface.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></code> - If an error occurred reading from or parsing the input.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>
